/** 
* All Rights Reserved , Copyright (C) 2020 , 青岛鼎信通讯股份有限公司
* 
* SysApiLogServiceAuto
* 接口传输日志
* 
* 修改纪录
* 2020-06-29 版本：1.0 zhanglongfei 创建。
* @version 版本：1.0
* @author 作者：zhanglongfei
* 创建日期：2020-06-29
*/

package com.topscomm.sys.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.sys.*;
import com.topscomm.sys.pojo.SysApiLogEntity;
import com.topscomm.sys.dao.ISysApiLogDao;


public class SysApiLogServiceAuto extends SysService<SysApiLogEntity,ISysApiLogDao> {
	
	/**
	 * @author: zhanglongfei
	 * @date: 2020-06-29
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("calltype") != null) {
			temp = mapRow.get("calltype").toString();
			mapRow.put("dispcalltype", datacodeCache.getValueDynamic("SysApiLogCallType", temp, "code", "name"));
		}
		if (mapRow.get("sourcetype") != null) {
			temp = mapRow.get("sourcetype").toString();
			mapRow.put("dispsourcetype", datacodeCache.getValueDynamic("SysApiSourceType", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "sysApiLogDao")
	public void setDao(IBasicDao<SysApiLogEntity> dao) {		
		super.setDao(dao);
	}
}
